﻿/// Для работы данного диалога необходимо прописать
/// <SafeControl Assembly="LookupWithPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e1eb4ce568bda77d" Namespace="LookupWithPicker" TypeName="*" Safe="True" />
/// в файле web.config
namespace LookupWithPicker
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.SharePoint.WebControls;
    using System.Collections;

    public class CustomLookupPickerDialog : PickerDialog
    {
        public CustomLookupPickerDialog()
            : base(new CustomLookupQueryControl(), new TableResultControl(), new CustomLookupEntityEditor())
        {
            ArrayList columnDisplayNames = ((TableResultControl)base.ResultControl).ColumnDisplayNames;
            columnDisplayNames.Clear();
            columnDisplayNames.Add(CustomLookupQueryControl.NAME_ID);
            columnDisplayNames.Add(CustomLookupQueryControl.NAME_TITLE);
            ArrayList columnNames = ((TableResultControl)base.ResultControl).ColumnNames;
            columnNames.Clear();
            columnNames.Add(CustomLookupQueryControl.NAME_ID);
            columnNames.Add(CustomLookupQueryControl.NAME_TITLE);
            ArrayList columnWidths = ((TableResultControl)base.ResultControl).ColumnWidths;
            columnWidths.Clear();
            columnWidths.Add("30%");
            columnWidths.Add("70%");
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
        }
    }
}
